{include file="kuerp/common/menu" /}
<div class="panel panel-default panel-intro">
    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <script type="text/html" id="thisToolbar">
                        <div class="layui-btn-container">
                           <button class="layui-btn layui-icon-btn layui-btn-sm layui-bg-cyan btn-refresh" lay-event="refresh"><i class="layui-icon">&#xe669;</i> {:__('Refresh')}</button>
                            <button class="layui-btn layui-icon-btn layui-btn-sm {if condition="$auth->check($nowmenu.'/add')!=1"}hiddens{/if}" lay-event="add"><i class="layui-icon">&#xe654;</i> {:__('Add')}</button>
                            <button class="layui-btn layui-icon-btn layui-btn-sm layui-btn-danger {if condition="$auth->check($nowmenu.'/del')!=1"}hiddens{/if}" lay-event="delAll"><i class="layui-icon">&#xe640;</i> {:__('Delete')}</button>

                            <button class="layui-btn layui-icon-btn layui-btn-sm layui-btn-danger fright {if condition="$auth->check($nowmenu.'/printss')!=1"}hiddens{/if}" lay-event="printss"
                                data-ptype="1" data-pl="{:url('kuerp/prints/prints')}" id="printss"><i class="layui-icon">&#xe66d;</i> 打印</button>

                            {if condition="isset($set['examine']['is_checked']) && $set['examine']['is_checked']==1"}
                            <button class="layui-btn layui-icon-btn layui-btn-sm layui-btn-danger fright {if condition="$auth->check($nowmenu.'/examine')!=1"}hiddens{/if}" lay-event="examine_f"><i class="layui-icon">&#xe674;</i> 反审核</button>
                            <button class="layui-btn layui-icon-btn layui-btn-sm fright {if condition="$auth->check($nowmenu.'/examine')!=1"}hiddens{/if}" lay-event="examine"><i class="layui-icon">&#xe674;</i> 审核</button>
                            {/if}

                            <input type="hidden" id="createpurchase" value="">
                            <button type="button" class="layui-btn layui-icon-btn layui-btn-sm layui-btn-danger fright createpurchase" data-purid="" data-id="" style="display: none">生成购货单</button>
                            <button type="button" class="layui-btn layui-icon-btn layui-btn-sm layui-btn-danger fright createexchange" data-purid="" data-id="" style="display: none">生成退货单</button>
                        </div>
                    </script>

                    <form class="layui-form layui-search" id="layui-search">

                        <div class="layui-input-inline">
                            <input type="text" name="purchase_code" id="purchase_code" autocomplete="off" placeholder="{:__('Purchase_code')}" class="layui-input">
                        </div>
                        <div class="layui-input-inline">
                            <input type="text" name="purchase_time" id="purchase_time" autocomplete="off" placeholder="{:__('Purchase_time')}" class="layui-input">
                        </div>
                        <div class="layui-input-inline" style="min-width: 182px;">
                            <input type="hidden" id="supplyer_code" value="">
                            <div id="supplyer_codes" class="xm-select-demo"></div>
                        </div>
                        <div class="layui-input-inline">
                            <select name="preparation_id" id="preparation_id" placeholder="{:__('Preparation_id')}" class="layui-input">
                                <option value="">请选择{:__('Preparation_id')}</option>
                                {foreach name="adminList" item="vo"}
                                <option value="{$vo.id}">{$vo.username}</option>
                                {/foreach}
                            </select>
                        </div>
                        <div class="layui-input-inline">
                            <select name="examine_id" id="examine_id" placeholder="{:__('Examine_id')}" class="layui-input">
                                <option value="">请选择{:__('Examine_id')}</option>
                                {foreach name="adminList" item="vo"}
                                <option value="{$vo.id}">{$vo.username}</option>
                                {/foreach}
                            </select>
                        </div>
                        <div class="layui-input-inline">
                            <select name="operation_id" id="operation_id" placeholder="{:__('Operation_id')}" class="layui-input">
                                <option value="">请选择{:__('Operation_id')}</option>
                                {foreach name="adminList" item="vo"}
                                <option value="{$vo.id}">{$vo.username}</option>
                                {/foreach}
                            </select>
                        </div>
                        <div class="layui-input-inline">
                            <select name="pay_status" id="pay_status" placeholder="{:__('Pay_status')}" class="layui-input">
                                <option value="">请选择{:__('Pay_status')}</option>
                                <option value="0">{:__('Pay_status 0')}</option>
                                <option value="1">{:__('Pay_status 1')}</option>
                                <option value="2">{:__('Pay_status 2')}</option>
                            </select>
                        </div>
                        <div class="layui-input-inline">
                            <select name="check_status" id="check_status" placeholder="{:__('Check_status')}" class="layui-input">
                                <option value="">请选择{:__('Check_status')}</option>
                                <option value="0">{:__('Check_status 0')}</option>
                                <option value="1">{:__('Check_status 1')}</option>
                            </select>
                        </div>
                        <div class="layui-input-inline">
                            <select name="examine_status" id="examine_status" placeholder="{:__('Examine_status')}" class="layui-input">
                                <option value="">请选择{:__('Examine_status')}</option>
                                <option value="0">{:__('Examine_status 0')}</option>
                                <option value="1">{:__('Examine_status 1')}</option>
                            </select>
                        </div>
                        <div class="layui-input-inline " style="width: 90px">
                            <button class="layui-btn layui-btn-sm" type="button" id="search" data-type="reload">
                                <i class="layui-icon"></i> {:__('Search')}
                            </button>
                        </div>
                    </form>
                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                           width="100%" lay-filter="table">
                    </table>
                </div>
            </div>

        </div>
    </div>
</div>
